<template>
    <view class="">
    	<view class="wrap">
    		<view v-for="item in dataList" :key="item.id">
    			<u-text margin="16px 0" :text="item.text" :key="item.id"></u-text>
    			<image v-for="e in item.img" :src="e" mode="widthFix"></image>
    		</view>
    	</view>
    </view>
</template>

<script>
	import { mapGetters } from "vuex";
	import { baseUrl } from "@/config/tendIdConfig";
export default {
    data() {
        return {
			dataList:[],
			value: "",
			value1: "",
			value2: "",
			fileList: [],
			fileList1: [],
			fileList2: [],
        };
    },
	onLoad(options) {
		this.id = decodeURIComponent(options.id);
		this.getDetailInfo(this.id)
	},
    methods: {
		getDetailInfo(id){
			const token =
			    this.$store.getters?.customer_token ||
			    uni.getStorageSync("customer_token");
			const that = this;
			uni.request({
				url:
				    baseUrl +
				    "/customer/video_info_customer/open/getVideoByIdNoToken/" +
				    id,
			    method: "GET",
			    header: {
			        Authorization: token,
			    },
			    success(res) {
			       const data = JSON.parse(res.data.data.infoDetail);
				   that.dataList = data.infoDetail
				   const list = that.dataList
				   that.value = list[0]?.text ?? "";
				   that.fileList = list[0]?.img ?? [];
				   that.value1 = list[1]?.text ?? "";
				   that.fileList1 = list[1]?.img ?? [];
				   that.value2 = list[2]?.text ?? "";
				   that.fileList2 = list[2]?.img ?? [];
			    },
			});
		}
    },
};
</script>

<style scoped lang="scss">
.wrap {
		padding: 30rpx;
		height: calc(100vh - 88rpx);
		overflow-y: scroll; // 超出滚动
		overscroll-behavior: none; // 禁止滚动溢出
	}
</style>
